# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=kdepim-runtime
pkgver=23.08.4
pkgrel=0
pkgdesc="Extends the functionality of kdepim"
url="https://kontact.kde.org/"
# armhf blocked by extra-cmake-modules
# ppc64le, s390x and riscv64 blocked by qt5-qtwebengine -> akonadi
arch="all !armhf !ppc64le !s390x !riscv64"
license="LGPL-2.0-or-later"
makedepends="
	akonadi-calendar-dev
	akonadi-contacts-dev
	akonadi-dev
	akonadi-mime-dev
	akonadi-notes-dev
	extra-cmake-modules
	kcalendarcore5-dev
	kcalutils-dev
	kcodecs5-dev
	kconfig5-dev
	kconfigwidgets5-dev
	kcontacts5-dev
	kdav5-dev
	kdoctools5-dev
	kholidays5-dev
	kidentitymanagement-dev
	kimap-dev
	kio5-dev
	kitemmodels5-dev
	kmailtransport-dev
	kmbox-dev
	kmime-dev
	knotifications5-dev
	knotifyconfig5-dev
	ktextwidgets5-dev
	kwindowsystem5-dev
	libkgapi-dev
	libxslt-dev
	pimcommon-dev
	qca-dev
	qt5-qtbase-dev
	qt5-qtnetworkauth-dev
	qt5-qtspeech-dev
	qt5-qtxmlpatterns-dev
	samurai
	shared-mime-info
	"
subpackages="$pkgname-dbg $pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/pim/kdepim-runtime.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/kdepim-runtime-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
74ddf93b6e96c64737cea61ff729eb01d43f4c023626ad6e4e0e72aa0a3d105fab0a16a9943d00a9a2f2117066653dc9535032ba360a4a56b38b741280a90921  kdepim-runtime-23.08.4.tar.xz
"
